import request from '@/utils/request'

// 查询客户结算方式列表
export function listMode(query) {
  return request({
    url: '/fees/mode/list',
    method: 'get',
    params: query
  })
}

// 查询客户结算方式详细
export function getMode(customerSettlementModeId) {
  return request({
    url: '/fees/mode/' + customerSettlementModeId,
    method: 'get'
  })
}

// 新增客户结算方式
export function addMode(data) {
  return request({
    url: '/fees/mode',
    method: 'post',
    data: data
  })
}

// 修改客户结算方式
export function updateMode(data) {
  return request({
    url: '/fees/mode',
    method: 'put',
    data: data
  })
}

// 删除客户结算方式
export function delMode(customerSettlementModeId) {
  return request({
    url: '/fees/mode/' + customerSettlementModeId,
    method: 'delete'
  })
}

// 查询客户结算方式详细
export function getModeByCustomerName(customerName) {
  return request({
    url: '/fees/mode/custom/' + customerName,
    method: 'get'
  })
}
